package ch15_classload.jni;

/**
 * @author guodd
 * @version 1.0 use jdk 1.8
 */
public class MyJni {
    static {
        System.out.println(System.getProperty("user.dir"));
        System.load(System.getProperty("user.dir") + "\\base-01\\src\\main\\java\\ch15_classload\\jni\\libmyjni.dll");
        System.out.println("init static...");
    }

    public static void main(String[] args) {
        int add = MyJni.add(2, 6);
        System.out.println(add);
    }

    public static native int add(int a, int b);
}
